package com.lanchetech.dao;

import com.lanchetech.bean.request.RoomReq;import com.lanchetech.entity.Room;
import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Param;import java.util.List;

@Mapper
public interface RoomMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Room record);

    int insertSelective(Room record);

    Room selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Room record);

    int updateByPrimaryKey(Room record);

    List<Room> findAllPage(RoomReq req);

    int updateDeletedById(@Param("updatedDeleted") Byte updatedDeleted, @Param("id") Long id);

    int updateStatusById(@Param("updatedStatus")Byte updatedStatus,@Param("id")Long id);

    int updateDeletedByAnchorUserId(@Param("updatedDeleted") Byte updatedDeleted, @Param("anchorUserId") Long anchorUserId);

    List<Room> findAllByAnchorUserId(@Param("anchorUserId") Long anchorUserId);

    Room findOneByAnchorUserIdAndStatus(@Param("anchorUserId") Long anchorUserId, @Param("status") Byte status);

    List<Room> findAllByAnchorUserIdsAndStatus(@Param("list") List<Long> list, @Param("status") Byte status);

    Long getGoodsCount(@Param("anchorId") Long anchorId);

    List<Room> findAllByAnchorUserIds(@Param("anchorUserIds") List<Long> anchorUserIds);

    int updateSortsById(@Param("updatedSorts")Integer updatedSorts,@Param("id")Long id);


}